package com.pjh.shitang.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pjh.shitang.entitys.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author yueyinghaibao
 * @date 2022/5/1
 */
@Mapper
@Repository
public interface CommentMapper extends BaseMapper<Comment> {
    @Update("update db_comment set likes = likes + #{count} where cid = #{cid}")
    public int update(@Param("count") Integer count, @Param("cid") Integer cid);
}
